{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# §1: Python environment\n",
    "\n",
    "## 1.1 What's python"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Python is an object-oriented scripting language that was released publicly in 1991. Python has repidly become the world's most popular programming languages.It's now particularly popular for educational and scientific computing."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "![](./fig/python_popularity.png)\n",
    "<center>The language searched frequency by google</center>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The reasons why python is popular:\n",
    "    \n",
    "    It's open source, free and widely available with a massive open-source community.\n",
    "    It's easier to learn than languages like C, C++, C# and Java.    \n",
    "    It's easier to read than many other popular programming languages.    \n",
    "    It's widely used in education.    \n",
    "    It enhances developer productivity with extensive standard libraries and thousands of third-party open-source libraries, so programmers can write code faster and perform complex tasks with minimal code.    \n",
    "    It's popular in artificial intelligence, which is enjoying explosive growth, in part because of its special relatioinship with data science."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.2 Install Python"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Anaconda is an integrated environment of python. It include python interpreter and most commanly used modules of science.There are two version of python: python2 and python3. You should install python3. Python can runing on windows, mac os and linux operating system.Download python from https://www.anaconda.com/, select the OS of your computer."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.3 Run Python"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### run in console\n",
    "\n",
    "Open the console by shortcut keys of windows win+R,then type cmd in the text box and type enter. You can see the console window with black background.\n",
    "\n",
    "Type python, then you can input python command after >>>\n",
    "\n",
    "![](./fig/console.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### run python file\n",
    "\n",
    "Python sorce file is a file with extend name .py. Writing your python sroce file and then type command \"python ***.py\" in console."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### run python by integrated development environment. \n",
    "\n",
    "There are many integrated development environment of python such as PyCharm. Anaconda also has one named Spyder.\n",
    "\n",
    "Open spider in anaconda folder. Write down you code and run by green triangle button."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### run python in Jupyter Notebook\n",
    "\n",
    "How to open Jupyter Notebook?\n",
    "\n",
    "type \"jupyter notebook\" in console or click start->Anaconda3->Jupyter Notebook"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Hello world.\n"
     ]
    }
   ],
   "source": [
    "print('Hello world.')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.4 Jupyter Notebook\n",
    "\n",
    "### 1.4.1 operation of Jupyter Notebook\n",
    "\n",
    "Run\n",
    "\n",
    "Add new box\n",
    "\n",
    "Change order\n",
    "\n",
    "Rename\n",
    "\n",
    "Modify box property\n",
    "\n",
    "Interrupt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**Change the default directory**\n",
    "\n",
    "method 1: click Anaconda Prompt in start, then input command \"jupyter notebook --generate-config\". It will write a file. Open this file and modify \"c.NotebookApp.notebook_dir = \" as your directory.\n",
    "\n",
    "method 2: write click the shortcut of Jupyter notebook, then click property, modify %USERPROFILE% as your directory."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.4.2 text"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# first level title\n",
    "## second level title\n",
    "### third level title\n",
    "*italics*\n",
    "\n",
    "**bold**\n",
    "\n",
    "***bond italics***\n",
    "\n",
    "~~Strikethrough~~\n",
    "\n",
    "<u>underline</u>\n",
    "\n",
    "<font color=red>How to modify color</font>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### formula"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$e^{i\\pi}+1=0$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
